import request from '@/utils/request';
import qs from 'qs';

export function initData(url, params, serverPath) {
  return request({
    url: process.env[serverPath] + url + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
  });
}

export function download(url, params, serverPath) {
  return request({
    url: process.env[serverPath] + url + '?' + qs.stringify(params, { indices: false }),
    method: 'get',
    responseType: 'blob'
  });
}
